home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Networking / ATP Demo 1.0 / READ ME - ATP Demo < prev   
Encoding:
Text File  |  1994-10-28  |  2.6 KB  |  34 lines  |  [TEXT/ttxt]

  1. *******************************************************************
  2. ATP Demo 1.0
  3. 10/28/94
  4.  
  5. ATP Demo is a sample application demonstrating the use of the AppleTalk Transaction
  6. Protocol (ATP).
  7.  
  8. Compilation Environment:
  9.     MPW 3.3.1 with the 68K Interfaces only
  10.  
  11. Brought to you by the Apple Developer Support Group
  12. Written by Scott Kuechle
  13. Questions/Comments should be sent to:
  14. AppleLink: DEVSUPPORT
  15.  
  16. Copyright © 1992-94, Apple Computer Inc. All Rights Reserved
  17. *******************************************************************
  18.  
  19. SUMMARY
  20.  
  21. This sample code demonstrates how to use the AppleTalk Transaction Protocol (ATP) to send data back and forth between two machines on the network. Most calls are made asynchronously with completion routines. The program uses Operating System Queues to keep track of outstanding calls, as outlined in Jim Luther's article "Asynchronous Routines on the Macintosh" in Develop issue #13.
  22.  
  23. INSTRUCTIONS
  24.  
  25. Launch the application on two different machines on the network. The application registers itself with the Name Binding Protocol (NBP) once it is launched. It uses the chooser name (Owner name for system 7.0.x users) as the object name and “atp” as the type name for its NBP entity name value.
  26.  
  27. Use the “Zone”, “Type” and “Object” popup menus to identify and select other machines that are running the application. Once a target machine has been selected, go to the "Request Options" menu and select "request clock time" if you would like to have the program display the clock time from the target machine, or select "request data" if you would like the application to request a block of test data from the target and verify its contents. The test data used is simply a resource (look for the resource 'test') that contains random data. To have the program send data of your choosing, simply modify the contents of the resource and save it with the application.
  28.  
  29. Also, you can have the application issue either a single request or multiple requests to the target. Select either  "single request only" or "continuous requests" from the "Request Options" menu to change this. The "continuous requests" option means that the application immediately issues another request to the target as soon as the previous request has been received. This is accomplished by using asynchronous calls with completion routines. Once the completion routine is executed, another asynchronous call is issued.
  30.  
  31. To make the application stop sending requests when in continuous mode, press the “Stop Requests” button (the button toggles between "Send Requests" and "Stop Requests" when in continuous mode).
  32.  
  33. Please send any comments to the DEVSUPPORT AppleLink address.
  34.